package com.ytjj.qmyx.admin.dao.channel;

import com.ytjj.qmyx.admin.model.ChannelLabel;
import com.ytjj.qmyx.admin.model.request.channel.ChannelLabelRequest;
import com.ytjj.qmyx.admin.model.request.channel.ChannelProductLabelEntity;
import com.ytjj.qmyx.admin.model.request.channel.ChannelProductLabelRequest;
import com.ytjj.qmyx.admin.model.response.channel.ChannelLabelDetailEntity;
import com.ytjj.qmyx.admin.model.response.channel.ChannelLabelResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ChannelLabelDao {

    List<ChannelLabelResponse> findList(ChannelLabelRequest channelLabelRequest);

    int batchInsertProductLabel(@Param("list") List<ChannelProductLabelEntity> list);

    List<ChannelLabelDetailEntity> findLabelAutoDetail(String channel);

    List<ChannelLabel> findByProductId(String channel,Integer productId);

    List<ChannelLabel> findByProductIds(@Param("channel") String channel, @Param("productIds") List<Integer> productIds);

    int countByProductAndLabelId(String channel,Integer productId,Integer labelId);

    int delProductLabel(ChannelProductLabelRequest request);
}
